//
//  UIView+CutViewRadius.m
//  jsy
//
//  Created by  任辰东 on 2020/4/13.
//  Copyright © 2020 JSY. All rights reserved.
//

#import "UIView+CutViewRadius.h"

@implementation UIView (CutViewRadius)

- (void)cutViewRadiusAndRadiusSize:(CGFloat)size{
    
    UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect:self.bounds byRoundingCorners:UIRectCornerAllCorners cornerRadii:CGSizeMake(size, size)];
    CAShapeLayer *maskLayer = [[CAShapeLayer alloc] init];
    maskLayer.frame = self.bounds;
    maskLayer.path = maskPath.CGPath;
    self.layer.mask = maskLayer;
    
}
@end
